/***
 * 医院设置相关api函数
 */
import {request} from '@utils/http'

import { IHospitalPostParams, IHospitalSetParams, IHospitalSetResponse } from './model/hospitalSetTypes'
/**
 * 
 * @param {page:当前页，limit:每页显示几条,hosname:医院名称,hoscode:医院编号}
 * @returns Promise<IHospitalSetResponse>
 */
export const getHospitalSetList = ({page,limit,hosname,hoscode}:IHospitalSetParams)=>{
    return request.get<any, IHospitalSetResponse>(`/admin/hosp/hospitalSet/${page}/${limit}`, {
        params:{
            hoscode,
            hosname
        }
    })
}
/**
 * 
 * @param data 添加医院设置请求体
 * @returns  Promise<null>
 */
export const addHospitaSet = (data:IHospitalPostParams)=>{
    return request.post<any,null>('/admin/hosp/hospitalSet/save', data)
}